The game of finding words within words requires the player to know how all words in the language are spelled so that from any given work he may make up as many other words as possible using each letter only once.
The primary objective of this invention is to implement a process by which a microcomputer may obtain the same result in a minimal amount of time. The goal to be obtained by reaching that objective is to create a computerized game program which can be run on any microcomputer so that an individual playing the game can enjoy an interactive play environment. This process achieves that goal and, when properly implemented, offers a game that is significantly enhanced by the computer.
There are many procedures a computer can follow to find all words contained within any given word. One of the slowest is to go through a dictionary in alphabetical order and place each word listed in a queue then delete any letters from that queue which correspond to letters in the given word. If the queue is empty when all letters in the given word have been used then the word is one which can be found in the given word.
This method is unacceptable as one which could be implemented for a real time game program since it would take an hour for an BOBB based microprocessor used in many popular computers today to scan a word list of only 25,000 entries for just one word. The problem of implementing such a game is magnified by use of an 8 bit microprocessor such as the 65C02 used by some other computers where it could take many hours to scan the same list. Perhaps that is why no game has been marketed for any computer where the object is to find all words in any given word.
The method of finding words within words described herein preprocesses each individual word that the user may find in his solution so that for each word length anagrams of the word are directly associated with the preprocessed listing. Each listing is placed in alphabetical order in a special dictionary which contains a finger index to a starting point in it so that when searching for a match the program does not have to search the list from beginning to end.
In order to find all words contained in any given word the microprocessor is directed to arrange the letters in the given word in alphabetical order then to search each successive word length for permutations of letters in that word from the length of the word down to the lower limit of word length allowed by rules of the game. When a match is found to the permutation of letters all words associated with those letters are moved to a solution queue and may be arranged in alphabetical order before being sent to an output device.
The preprocessing of words into a concatenation of alphabetized letters which is then placed in alphabetical order may be stored on disk media or in computer memory. Although the process may be applied to data storage in a different media the procedure described herein constrains it to reside on a computer disk or a disk image resident in memory. This is not intended to be a limiting factor since, under a different procedure to effect the same process, only the method of storage and retrieval of data would change.